######################################## 
# Flavor events for Poland
# 
# written by Sara Wendel-rtqvist
######################################## 

namespace = flavor_pol
normal_or_historical_nations = yes

# The Nieszawa Privileges-'Conventiones Particulares'
country_event = {
	id = flavor_pol.3467
	title = "flavor_pol.EVTNAME3467"
	desc = "flavor_pol.EVTDESC3467"
	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1460
		NOT = { is_year = 1485 }
	}
	
	mean_time_to_happen = {
		months = 50
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3467" # Accept the Conventions
		add_country_modifier = { 
			name = pol_nieszawa_privileges
			duration = -1 
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3467" # Refuse to sign it and defy the Magnates
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 3
		}
	}
}

# The Statute of Piotrkow
country_event = {
	id = flavor_pol.3468
	title = "flavor_pol.EVTNAME3468"
	desc = "flavor_pol.EVTDESC3468"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1490
		NOT = { is_year = 1500 }
	}
	
	mean_time_to_happen = {
		months = 50
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3468" # Enact
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		add_country_modifier = {
			name = pol_statute_piotrkow
			duration = 10950
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3468" # Refuse to enact
		add_stability = -3
	}
}

# The Polish Inheritance of Masovia
country_event = {
	id = flavor_pol.3473
	title = "flavor_pol.EVTNAME3473"
	desc = "flavor_pol.EVTDESC3473"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		NOT = { exists = MAZ } 
		owns_core_province = 257 # Warszawa
		owns_core_province = 1938 #Wizna
		owns_core_province = 256 #Plock
	}
	
	mean_time_to_happen = {
		months = 12
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3473" # Make it a personal royal fiefdom
		257 = { # Warszawa
			if = {
				limit = {
					NOT = { has_dlc = "Common Sense" }
				}
				add_base_tax = 2
			}
			if = {
				limit = {
					has_dlc = "Common Sense"
				}
				add_province_modifier = {
					name = "economic_development_of_mazovia"
					duration = -1
				}
			}
		}
	}
}

# The Jesuit King
country_event = {
	id = flavor_pol.3477
	title = "flavor_pol.EVTNAME3477"
	desc = "flavor_pol.EVTDESC3477"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		religion = catholic
		has_regency = no
		is_year = 1600 
		NOT = { is_year = 1650 }
		has_country_modifier = counter_reformation
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3477" # Religious Freedom won the day
		remove_country_modifier = counter_reformation
		add_ruler_modifier = { 
			name = pol_religious_freedom
		}
		every_country = {
			limit = {
				religion = catholic
				has_country_modifier = counter_reformation
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_pol_religious_freedom
			}
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3477" # The Catholic Faith are the First among Equals
		every_country = {
			limit = {
				religion = catholic
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_pol_true_faith
			}
		}		
	}
	option = {
		name = "flavor_pol.EVTOPTC3477" # Hail the Jesuit King!
		add_ruler_modifier = { 
			name = pol_jesuit_king 
		}
	}
}

# The Pacta Conventa and the Henrykian Articles
country_event = {
	id = flavor_pol.3480
	title = "flavor_pol.EVTNAME3480"
	desc = "flavor_pol.EVTDESC3480"
	picture = REFORM_eventPicture
	
	is_triggered_only = yes	
	trigger = {
		government = elective_monarchy
		primary_culture = polish
		NOT = { has_country_flag = pol_pact_conventa_flag }
		OR = {
			NOT = { ADM = 2 }
			NOT = { DIP = 2 }
			NOT = { MIL = 2 }
		}
		NOT = { has_country_flag = pol_pact_conventa_flag_had_before }
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3480" # There is nothing we can do my King
		add_country_modifier = { 
			name = pol_pact_conventa
			duration = -1
		}
		set_country_flag = pol_pact_conventa_flag
		set_country_flag = pol_pact_conventa_flag_had_before
	}
}

# The Sobieskian Army Reforms
country_event = {
	id = flavor_pol.3485
	title = "flavor_pol.EVTNAME3485"
	desc = "flavor_pol.EVTDESC3485"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1672
		NOT = { is_year = 1681 }
	}
	
	mean_time_to_happen = {
		months = 40
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3485" # Make a strict Army Reform only
		add_yearly_manpower = 1
		add_mil_power = 150
		add_stability_or_adm_power = yes
	}
	option = {
		name = "flavor_pol.EVTOPTB3485" # Reform Army and undermine the power of the Sejm
		trigger = {
			has_country_modifier = pol_nieszawa_privileges
		}
		remove_country_modifier = pol_nieszawa_privileges
		add_mil_power = 50
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 3
		}
	}
}

# The Great Northern Conflict
country_event = {
	id = flavor_pol.3491
	title = "flavor_pol.EVTNAME3491"
	desc = "flavor_pol.EVTDESC3491"
	picture = BATTLE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_year = 1650
		NOT = { is_year = 1750 }
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_rival = SWE
		SWE = {
			is_rival = ROOT
		}		
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3491" # Advance!
		SWE = {
			add_opinion = {
				who = POL
				modifier = opinion_polish_aggressions
			}
			every_rival_country = {
				add_opinion = {
					who = POL
					modifier = opinion_common_enemy
					years = 10
				}
			}
		}
	
	
		every_owned_province = {
			every_neighbor_province = {
				limit = {
					owned_by = SWE
					NOT = { is_core = ROOT }
				}
				add_claim = ROOT
			}
		}	
		
	}
	option = {
		name = "flavor_pol.EVTOPTB3491" # Stay calm for a while
		add_prestige = -10
		SWE = {
			add_opinion = {
				who = POL
				modifier = opinion_ignored_claim
			}
		}
	}
}

# Turko-Polish Tension
country_event = {
	id = flavor_pol.3488
	title = "flavor_pol.EVTNAME3488"
	desc = "flavor_pol.EVTDESC3488"
	picture = DIPLOMACY_eventPicture
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		exists = TUR
		NOT = { alliance_with = TUR }
		NOT = { is_subject_of = TUR }

		NOT = { has_country_modifier = pol_tur_tension_timer }
		OR = {
			AND = {
				is_neighbor_of = TUR
				TUR = {
					any_owned_province = {
						any_neighbor_province = {
							owned_by = ROOT
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
				}
			}
			any_known_country = {
				vassal_of = ROOT
				is_neighbor_of = TUR
				TUR = {
					any_owned_province = {
						any_neighbor_province = {
							owner = {
								vassal_of = ROOT
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
				}
			}
			any_known_country = {
				OR = {
					junior_union_with = ROOT
					senior_union_with = ROOT
				}
				is_neighbor_of = TUR
				TUR = {
					any_owned_province = {
						any_neighbor_province = {
							owner = {
								OR = {
									junior_union_with = ROOT
									senior_union_with = ROOT
								}
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3488" # We will defend Christendom
		add_country_modifier = {
			name = pol_tur_tension_timer
			duration = 3650
			hidden = yes
		}
		add_yearly_manpower = 1
		if = {
			limit = {
				is_neighbor_of = TUR
			}
			TUR = {
				random_owned_province = {
					limit = {
						any_neighbor_province = {
							owned_by = ROOT
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
					add_claim = ROOT
				}
			}
		}
		if = {
			limit = {
				NOT = { is_neighbor_of = TUR }
				any_known_country = {
					vassal_of = ROOT
					is_neighbor_of = TUR
				}
			}
			TUR = {
				random_owned_province = {
					limit = {
						any_neighbor_province = {
							owner = {
								vassal_of = ROOT
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
					add_claim = ROOT
				}
			}
		}
		if = {
			limit = {
				NOT = { is_neighbor_of = TUR }
				NOT = {
					any_known_country = {
						vassal_of = ROOT
						is_neighbor_of = TUR
					}
				}
				any_known_country = {
					OR = {
						junior_union_with = ROOT
						senior_union_with = ROOT
					}
					is_neighbor_of = TUR
				}
			}
			TUR = {
				random_owned_province = {
					limit = {
						any_neighbor_province = {
							owner = {
								OR = {
									junior_union_with = ROOT
									senior_union_with = ROOT
								}
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
					add_claim = ROOT
				}
			}
		}
	}
}

# The Horrible Plague in Lithuania
country_event = {
	id = flavor_pol.3493
	title = "flavor_pol.EVTNAME3493"
	desc = "flavor_pol.EVTDESC3493"
	picture = PLAGUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		NOT = { exists = LIT }
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1700 
		NOT = { is_year = 1750 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3493" # There is nothing we can do
		ai_chance = { 
			factor = 25 
		}
		add_country_modifier = { 
			name = severe_plague
			duration = 1825 
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3493" # Try to contain it
		ai_chance = { 
			factor = 75 
		}
		add_adm_power = -50
		add_country_modifier = { 
			name = contained_plague
			duration = 1825 
		}
	}
}

# Ending the Stagnation - Jan Sobieski
country_event = {
	id = flavor_pol.3497
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3497"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		OR = { 
			has_country_flag = librium_veto
			has_country_modifier = pol_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1680 
		NOT = { is_year = 1695 }

	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		custom_tooltip = "pol_stag_maybe_more"

	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_country_modifier = pol_nieszawa_privileges
	}
}

# Ending the Stagnation - Friedrich Augustus II
country_event = {
	id = flavor_pol.3498
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3498"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		OR = { 
			has_country_flag = librium_veto
			has_country_modifier = pol_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1697
		NOT = { is_year = 1712 }
	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		custom_tooltip = "pol_stag_maybe_more"
		
	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_country_modifier = pol_nieszawa_privileges
	}
}

# Ending the Stagnation - Stanislaus Poniatowski
country_event = {
	id = flavor_pol.3499
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3499"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		OR = { 
			has_country_flag = librium_veto
			has_country_modifier = pol_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1765
		NOT = { is_year = 1780 }
		
	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		custom_tooltip = "pol_stag_maybe_more"
		
	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_country_modifier = pol_nieszawa_privileges
	}
}

# Ending the Stagnation - King Stanislaus
country_event = {
	id = flavor_pol.3500
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3500"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		OR = { 
			has_country_flag = librium_veto
			has_country_modifier = pol_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1785
		NOT = { is_year = 1800 }

		
	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability = 2
		add_mercantilism = 3
		custom_tooltip = "pol_stag_no_more"

	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_country_modifier = pol_nieszawa_privileges
	}
}

# The Sejm refuse to allow the mobilization of more troops
country_event = {
	id = flavor_pol.3738
	title = "flavor_pol.EVTNAME3738"
	desc = "flavor_pol.EVTDESC3738"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		primary_culture = polish
		has_regency = no
		has_country_flag = pol_pact_conventa_flag
		NOT = {
			has_ruler_modifier = pol_sejm_refuse_timer
		}
		government = monarchy
	}
	
	mean_time_to_happen = {
		months = 6
	}
	immediate = {
		hidden_effect = {
			add_ruler_modifier = {
				name = pol_sejm_refuse_timer
				hidden = yes
			}
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTOK"
		add_ruler_modifier = { name = pol_sejm_refuse_troops } 
		
	}
	option = {
		name = "flavor_pol.EVTOPTA3738"
		add_legitimacy = -20
		add_stability = -1
	}
}

# The Sejm comply to your policies
country_event = {
	id = flavor_pol.3743
	title = "flavor_pol.EVTNAME3743"
	desc = "flavor_pol.EVTDESC3743"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		primary_culture = polish
		has_regency = no
		has_country_flag = pol_pact_conventa_flag
		NOT = {
			has_ruler_modifier = pol_sejm_refuse_timer
		}
		government = monarchy
	}
	
	mean_time_to_happen = {
		months = 3
	}
	immediate = {
		hidden_effect = {
			add_ruler_modifier = {
				name = pol_sejm_refuse_timer
				hidden = yes
			}
		}
	}
	

	option = {
		name = "flavor_pol.EVTOPTA3743"
		add_ruler_modifier = { name = pol_sejm_comply_policies } 
	}
}

# The Sejm veto all your policies
country_event = {
	id = flavor_pol.3744
	title = "flavor_pol.EVTNAME3744"
	desc = "flavor_pol.EVTDESC3744"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		primary_culture = polish
		has_regency = no
		has_country_flag = pol_pact_conventa_flag
		NOT = {
			has_ruler_modifier = pol_sejm_refuse_timer
		}
		government = monarchy
	}
	
	mean_time_to_happen = {
		months = 6
	}
	immediate = {
		hidden_effect = {
			add_ruler_modifier = {
				name = pol_sejm_refuse_timer
				hidden = yes
			}
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTOK"
		add_ruler_modifier = { name = pol_sejm_veto } 
	}
	option = {
		name = "flavor_pol.EVTOPTA3738"
		add_legitimacy = -20
		add_stability = -1
	}

}

# Nicolaus Copernicus
country_event = {
	id = flavor_pol.5100
	title = "flavor_pol.EVTNAME5100"
	desc = "flavor_pol.EVTDESC5100"
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1500
		NOT = { is_year = 1543 }

	}
	
	mean_time_to_happen = {
		months = 120
	}
	
	option = {
		name = "flavor_pol.EVTOPTOK"
		add_adm_power = 40
		add_dip_power = 40
		add_mil_power = 40
		add_prestige = 10
	}
}

# PolishLithuanian Commonwealth Navy
country_event = {
	id = flavor_pol.1
	title = "flavor_pol.EVTNAME1"
	desc = "flavor_pol.EVTDESC1"
	picture = NAVAL_MILITARY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1625
		NOT = { is_year = 1650 }
		num_of_ports = 1
		# tag = PLC
	}
	
	mean_time_to_happen = {
		months = 50
	}
	
	option = {
		name = "flavor_pol.EVTOPTA1" # Build a Great Navy
		add_navy_tradition = 20

		random_owned_province = {
			limit = {
				has_port = yes
			}
			add_unit_construction = {
				type = heavy_ship
				amount = 5
				speed = 0.1
				cost = 0
			}
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB1" # Abandon the plans
		add_stability = 1
	}
}

# Sigismund's Column
country_event = {
	id = flavor_pol.2
	title = "flavor_pol.EVTNAME2"
	desc = "flavor_pol.EVTDESC2"
	picture = IMPORTANT_STATUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1640
		NOT = { is_year = 1665 }
		prestige = 50
		NOT = {
			has_ruler_modifier = pol_jesuit_king
		}
		owns = 257
	}
	
	mean_time_to_happen = {
		months = 100
	}
	
	option = {
		name = "flavor_pol.EVTOPTA2" # Construct Sigismund's Column
		add_years_of_income = -0.5
		add_country_modifier = {
			name = "pol_sigismunds_column"
			duration = 10950
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB2" # There is no need to commemorate King Sigismund!
		add_prestige = -1
		add_legitimacy = 10
	}
}

# Merkuriusz Polski Ordynaryjny
country_event = {
	id = flavor_pol.3
	title = "flavor_pol.EVTNAME3"
	desc = "flavor_pol.EVTDESC3"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1660
		NOT = { is_year = 1700 }
	}
	
	mean_time_to_happen = {
		months = 100
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3" # Sponsor the newspaper
		add_years_of_income = -0.15
		add_ruler_modifier = {
			name = pol_merkuriusz_polski_ordynaryjny
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3" # Allow it
		add_stability_or_adm_power = yes
	}
	option = {
		name = "flavor_pol.EVTOPTC3" # Ban it
		trigger = { is_lesser_in_union = no }
		add_legitimacy = 15
	}
}

# Vilnius University
country_event = {
	id = flavor_pol.4
	title = "flavor_pol.EVTNAME4"
	desc = "flavor_pol.EVTDESC4"
	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1570
		NOT = { is_year = 1610 }
		owns = 272 # Vilna
		NOT = { exists = LIT }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA4" # Sponsor the University
		add_years_of_income = -0.25
		add_prestige = 5
		add_adm_power = 100
	}
	option = {
		name = "flavor_pol.EVTOPTB4" # Do nothing
		add_prestige = -1
	}
}

# Jan Brozek
country_event = {
	id = flavor_pol.5
	title = "flavor_pol.EVTNAME5"
	desc = "flavor_pol.EVTDESC5"
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1600
		NOT = { is_year = 1652 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA5" # Hire him as advisor
		add_years_of_income = -0.2
		add_dip_power = 100
		define_advisor = {
			type = natural_scientist
			name = "Jan Brozek"
			discount = yes
			skill = 2
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB5" # Ignore him
		add_prestige = -1
	}
}

# Michal Sedziwj
country_event = {
	id = flavor_pol.6
	title = "flavor_pol.EVTNAME6"
	desc = "flavor_pol.EVTDESC6"
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1600
		NOT = { is_year = 1636 }
	}
	
	mean_time_to_happen = {
		months = 150
	}
	
	option = {
		name = "flavor_pol.EVTOPTA5" # Hire him as advisor
		add_years_of_income = -0.2
		add_adm_power = 100
		define_advisor = {
			type = philosopher
			name = "Michal Sedziwj"
			discount = yes
			skill = 3
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB5" # Ignore him
		add_prestige = -1
	}
}

# Zamojski Academy
country_event = {
	id = flavor_pol.7
	title = "flavor_pol.EVTNAME7"
	desc = "flavor_pol.EVTDESC7"
	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1590
		NOT = { is_year = 1650 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA4" # Sponsor the university
		add_years_of_income = -0.25
		add_prestige = 5
		add_mil_power = 100
	}
	option = {
		name = "flavor_pol.EVTOPTB4" # Do nothing
		add_prestige = -1
	}
}

### THE STRUGGLE FOR ROYAL POWER ### 
country_event = {
	id = flavor_pol.3481
	title = "flavor_pol.EVTNAME3481"
	desc = "flavor_pol.EVTDESC3481"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		has_country_flag = pol_pact_conventa_flag
		is_year = 1600
		government = monarchy
		NOT = {
			has_country_flag = pol_zebrzydowski_rebellion_flag
		}
	}
	
	mean_time_to_happen = {
		months = 100
		modifier = {
			factor = 0.5
			has_country_flag = librium_veto
		}
		modifier = {
			factor = 0.5
			has_country_modifier = pol_nieszawa_privileges
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTB3481" # Resign completely and read theological books instead
		ai_chance = {
			factor = 0
		}
		add_prestige = -100
		if = {
			limit = { NOT = { government = celestial_empire } }
			change_government = oligarchic_republic
		}
		define_ruler = {
			regency = yes
			adm = 0
			dip = 0
			mil = 0
		}
		remove_country_modifier = pol_nieszawa_privileges
		remove_country_modifier = pol_statute_piotrkow
		remove_country_modifier = pol_pact_conventa
		clr_country_flag = librium_veto
	}
	option = {
		name = "flavor_pol.EVTOPTC3481" # Wage a war of extermination on the Nobility
		
		set_country_flag = pol_zebrzydowski_rebellion_flag
		
		add_country_modifier = {
			name = "pol_zebrzydowski_rebellion_flag"
			duration = -1
			desc = "END_OF_ROYAL_STRUGGLE"
		}
		add_stability = -3
		
		random_owned_province = {
			limit = {
				is_capital = yes
			}
			polish_noble_rebels = 6
		}
		random_owned_province = {
			limit = {
				is_capital = no
				continent = europe
			}
			polish_noble_rebels = 3
		}
	}
}

# Konfederacja
country_event = {
	id = flavor_pol.10
	title = "flavor_pol.EVTNAME10"
	desc = "flavor_pol.EVTDESC10"
	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		has_country_modifier = pol_zebrzydowski_rebellion_flag
	}
	
	mean_time_to_happen = {
		months = 36
	}
	
	option = {
		name = "flavor_pol.EVTOPTA10" # Accept their demands
		add_ruler_modifier = {
			name = pol_konfederacja
		}
		set_country_flag = pol_konfederacja_flag
	}
	option = {
		name = "flavor_pol.EVTOPTB10" # Reject their demands
		add_prestige = -5
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 3
		}
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 2
		}
		set_country_flag = pol_konfederacja_flag
	}
}

# Rokosz Sandomierski
country_event = {
	id = flavor_pol.11
	title = "flavor_pol.EVTNAME11"
	desc = "flavor_pol.EVTDESC11"
	picture = ANGRY_MOB_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		primary_culture = polish
		has_country_modifier = pol_zebrzydowski_rebellion_flag
		has_country_flag = pol_konfederacja_flag
	}
	
	mean_time_to_happen = {
		months = 36
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_core = POL
				}
				set_province_flag = POL_rokosz_sandomierski_flag1
			}
			random_owned_province = {
				limit = {
					NOT = {
						has_province_flag = POL_rokosz_sandomierski_flag1
					}
				}
				set_province_flag = POL_rokosz_sandomierski_flag2
			}
			random_owned_province = {
				limit = {
					NOT = {
						has_province_flag = POL_rokosz_sandomierski_flag1
					}
					NOT = {
						has_province_flag = POL_rokosz_sandomierski_flag2
					}
				}
				set_province_flag = POL_rokosz_sandomierski_flag3
			}
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTA11" # Confer with the rebel leaders
		add_adm_power = -100
		add_dip_power = -100
		add_mil_power = -100
		add_legitimacy = -50
		every_neighbor_country = {
			add_opinion = {
				who = ROOT
				modifier = opinion_negotiated_rebels
			}
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB11" # Suppress the rebels
		random_owned_province = {
			limit = {
				has_province_flag = POL_rokosz_sandomierski_flag1
			}
			polish_noble_rebels = 3
			clr_province_flag = POL_rokosz_sandomierski_flag1
		}
		random_owned_province = {
			limit = {
				has_province_flag = POL_rokosz_sandomierski_flag2
			}
			polish_noble_rebels = 2
			clr_province_flag = POL_rokosz_sandomierski_flag2
		}
		random_owned_province = {
			limit = {
				has_province_flag = POL_rokosz_sandomierski_flag3
			}
			polish_noble_rebels = 1
			clr_province_flag = POL_rokosz_sandomierski_flag3
		}
		every_neighbor_country = {
			add_opinion = {
				who = ROOT
				modifier = opinion_suppressed_rebels
			}
		}
	}
}

# Pacification Sejm
country_event = {
	id = flavor_pol.12
	title = "flavor_pol.EVTNAME12"
	desc = "flavor_pol.EVTDESC12"
	picture = ANGRY_MOB_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		had_country_flag = { flag = pol_zebrzydowski_rebellion_flag days = 1000 }
		NOT = { num_of_rebel_controlled_provinces = 1 }
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = "flavor_pol.EVTOPTA12" # The nobles has formally surrendered
		remove_country_modifier = pol_pact_conventa
		remove_country_modifier = pol_zebrzydowski_rebellion_flag
		clr_country_flag = pol_zebrzydowski_rebellion_flag
		clr_country_flag = pol_konfederacja_flag
		clr_country_flag = pol_pact_conventa_flag
		remove_country_modifier = pol_sejm_veto
		remove_country_modifier = pol_sejm_refuse_troops
		remove_country_modifier = pol_sejm_comply_policies
		add_prestige = 50
		add_stability = 3
		add_legitimacy = 50
		if = {
			limit = {
				government = elective_monarchy
			}
			change_government = despotic_monarchy
			remove_heir = yes
			add_absolutism = 10
		}
	}
}

# cleanup event for hotfix
country_event = {
	id = flavor_pol.13
	title = "flavor_pol.EVTNAME12"
	desc = "flavor_pol.EVTDESC12"
	picture = ANGRY_MOB_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		has_country_modifier = pol_zebrzydowski_rebellion_flag
		NOT = { has_country_flag = pol_zebrzydowski_rebellion_flag }
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = "flavor_pol.EVTOPTA12" # The nobles has formally surrendered
		remove_country_modifier = pol_pact_conventa
		remove_country_modifier = pol_zebrzydowski_rebellion_flag
		remove_country_modifier = pol_sejm_veto
		remove_country_modifier = pol_sejm_refuse_troops
		remove_country_modifier = pol_sejm_comply_policies
		clr_country_flag = pol_konfederacja_flag
	}
}

# Collegium Hosianum
country_event = {
	id = flavor_pol.14
	title = flavor_pol.14.t
	desc = flavor_pol.14.d

	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		owns = 42
		is_year = 1560
		NOT = { is_year = 1575 }
		religion = catholic
	}
	
	mean_time_to_happen = {
		months = 45
	}
	
	option = {
		name = flavor_pol.14.a #Great!
		add_prestige = 5
		42 = {
			add_province_modifier = {
				name = "pol_collegium_hosianum"
				duration = -1
			}
			if = {
				limit = { NOT = { religion = catholic } }
				change_religion = catholic
			}
		}
	}
}

# The Radziwill Bible & the Reformation in Poland
country_event = {
	id = flavor_pol.15
	title = flavor_pol.15.t
	desc = flavor_pol.15.d

	picture = BIG_BOOK_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1560
		NOT = { is_year = 1570 }
		religion = catholic
		is_religion_enabled = reformed
		owns = 260
	}
	
	mean_time_to_happen = {
		months = 30
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_capital = no
					culture = polish
					religion = catholic
					NOT = { province_id = 260 }
				}
				set_province_flag = reading_brest_bible
			}
			random_owned_province = {
				limit = {
					is_capital = no
					culture = polish
					religion = catholic
					NOT = { province_id = 260 }
					NOT = { has_province_flag = reading_brest_bible }
				}
				set_province_flag = reading_brest_bible
			}
		}
	}
	
	option = { #We must burn this abomination
		name = flavor_pol.15.a
		add_papal_influence = 10
		260 = {
			change_religion = reformed
			add_province_modifier = {
				name = add_unrest_10_modifier
				duration = 1825
			}
		}
		every_owned_province = {
			limit = {
				has_province_flag = reading_brest_bible
			}
			add_province_modifier = {
				name = add_unrest_10_modifier
				duration = 1825
			}
		}
	}
	
	option = { #Interesting...
		name = flavor_pol.15.b
		260 = {
			change_religion = reformed
		}
		every_owned_province = {
			limit = {
				has_province_flag = reading_brest_bible
			}
			change_religion = reformed
		}
	}
}

#State religion resulting in the suspension of the College.
country_event = {
	id = flavor_pol.16
	title = flavor_pol.16.t
	desc = flavor_pol.16.d

	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		any_owned_province = {
			has_province_modifier = pol_collegium_hosianum
		}
		NOT = { religion = catholic }
	}
	
	mean_time_to_happen = {
		months = 45
	}
	
	option = {
		name = flavor_pol.16.a #Suspend the College
		42 = {
			remove_province_modifier = pol_collegium_hosianum
		}
	}
}

#Clearing of Teutonic Rivalry
country_event = {
	id = flavor_pol.17
	title = flavor_pol.17.t
	desc = flavor_pol.17.d

	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		historical_rival_with = TEU
		TEU = {
			is_subject_of = ROOT
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = flavor_pol.17.a #
		add_prestige = 10
		remove_historical_rival = TEU
		TEU = {
			remove_historical_rival = ROOT
		}
	}
}

#Election of Kasimir
country_event = {
	id = flavor_pol.18
	title = flavor_pol.18.t
	desc = flavor_pol.18.d

	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	major = yes
	
	trigger = {
		tag = POL
		is_subject = no
		has_regency = yes
		NOT = { government = celestial_empire }
		LIT = {
			ai = yes
			exists = yes
			was_player = no
			is_subject = no
			NOT = { junior_union_with = POL }
			dynasty = "Jagiellon"
		}
		NOT = { is_year = 1450 }
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.1
			is_year = 1447
		}
		modifier = {
			factor = 0.01
			is_year = 1448
		}
		modifier = {
			factor = 0.001
			is_year = 1449
		}
	}
	
	option = {
		name = flavor_pol.18.a #We must retain the Jagiellon Dynasty
		ai_chance = { 
			factor = 75 
		}
		create_union = LIT
		country_event = {
			id = flavor_pol.20
		}
	}
	
	option = {
		name = flavor_pol.18.b #Appoint a Local Noble.
		ai_chance = { 
			factor = 25
		}
		define_ruler = {
			DIP = 4
			ADM = 4
			MIL = 4
			claim = 60
		}
		LIT = {
			add_opinion = {
				who = ROOT
				modifier = lit_denied_birthright
			}
		}
	}
}

# Become elective
country_event = {
	id = flavor_pol.20
	title = flavor_pol.20.t
	desc = flavor_pol.20.d

	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		is_year = 1300
	}
	
	option = {
		name = flavor_pol.20.a
		change_government = elective_monarchy
	}
}

